import { createRequest } from '/@/api/service';
const module = 'ib/base/v1/DeviceListApi/';

/**
 * @function 根据区域ID集合查询对应的设备集合状态
 * @param data
 * @param header
 * @returns {Promise}
 */
function QUERY_DEVICE_BY_AREA_IDS(
  data: DeviceListApi.QueryDeviceByAreaIdsReq,
  header: object = {},
): Promise<DeviceListApi.QueryDeviceByAreaIdsResp> {
  return createRequest(
    `${process.env.APP_API_URL}${module}queryDeviceByAreaIds`,
    data,
    header,
    'POST',
  );
}

/**
 * @function 查询物联设备开关状态信息
 * @param data
 * @param header
 * @returns {Promise}
 */
function QUERY_SWITCH_STATUS_LIST(
  data: DeviceListApi.QuerySwitchStatusListReq,
  header: object = {},
): Promise<DeviceListApi.QuerySwitchStatusListResp> {
  return createRequest(
    `${process.env.APP_API_URL}${module}querySwitchStatusList`,
    data,
    header,
    'POST',
  );
}

export { QUERY_DEVICE_BY_AREA_IDS, QUERY_SWITCH_STATUS_LIST };
